# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=libgravatar
pkgver=20.04.3
pkgrel=0
pkgdesc="KDE PIM library providing Gravatar support"
arch="all !armhf"
url="https://kontact.kde.org/"
license="LGPL-2.0-or-later"
depends_dev="qt5-qtbase-dev ki18n-dev kconfig-dev kwidgetsaddons-dev ktextwidgets-dev kio-dev pimcommon-dev"
makedepends="$depends_dev extra-cmake-modules"
checkdepends="xvfb-run"
source="https://download.kde.org/stable/release-service/$pkgver/src/libgravatar-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}
sha512sums="01481277c745e61961c84838fbcebc9188ed6402328e090c132ae0a79d66fb736606ad10933ad7b1a8a107f1f65b6b10fc3de815dfe05711c52f0f724ed17603  libgravatar-20.04.3.tar.xz"
